/**
 * Created by zhaott on 2018/9/21.
 */
var gulp = require("gulp");
var ts = require("gulp-typescript");
var tsProject = ts.createProject("tsconfig.json");

gulp.task('default',['test']);//,'copy-html'

gulp.task("compile", function () {
    return tsProject.src()
        .pipe(tsProject())
        .js.pipe(gulp.dest("dist"));
});

const shell = require('gulp-shell');
gulp.task('test',['compile'], function () {
    return gulp.src(['dist/**.js',"!**/*html*/*.js"], {read: false})
        .pipe(shell([
            'node <%= file.path %>'
        ]))
});
gulp.task('test',['compile'], function () {
    return gulp.src(['dist/**.js'], {read: false})
        .pipe(shell([
            'node <%= file.path %>'
        ]))
});
